<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>商品后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="/static/admin/css/admin.css"/>
    <script src="/static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
    <script src="/static/admin/js/main.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="/js/jquery-1.11.1.js"></script>
    <script src="/fonts/iconfont.js"></script>
</head>
<body>
<div class="main-layout" id='main-layout'>
    <!--侧边栏-->
    <div class="main-layout-side">
        <div class="m-logo">商品后台管理系统</div>
        <ul class="layui-nav layui-nav-tree" lay-filter="leftNav1">

            <li class="layui-nav-item">
                <a href="/pages/console.html" target="iframe"><i class="iconfont">&#xe607;</i>主页</a>
            </li>

            <li class="layui-nav-item layui-nav-item">
                <a href="javascript:;"><i class="iconfont">&#xe60e;</i>库存</a>
                <dl class="layui-nav-child">
                    <dd><a href="/pages/Inventory/list.html" target="iframe"><span class="l-line"></span>库存列表</a></dd>
                    <dd><a href="/pages/inpstock/list.html" target="iframe"><span class="l-line"></span>入库信息</a></dd>
                    <dd><a href="/pages/product/list.html" target="iframe"><span class="l-line"></span>商品列表</a></dd>
                    <dd style="display: none" class="hidden"><a href="/pages/inpstock/add.html" target="iframe"><span class="l-line"></span>商品入库</a></dd>
                </dl>
            </li>

            <li class="layui-nav-item">
                <a href="javascript:;"><i class="iconfont">&#xe60e;</i>销售</a>
                <dl class="layui-nav-child">
                    <dd><a href="/pages/order/list.html" target="iframe"><span class="l-line"></span>销售出货</a></dd>
                    <dd><a href="/pages/distribution/list.html" target="iframe"><span class="l-line"></span>配送列表</a></dd>
                    <dd><a href="/pages/order/add.html" target="iframe"><span class="l-line"></span>销售记录</a></dd>
                    <dd><a href="/pages/distribution/add.html" target="iframe"><span class="l-line"></span>配送记录</a></dd>
                </dl>
            </li>

            <li class="layui-nav-item hidden" style="display: none">
                <a href="javascript:;"><i class="iconfont">&#xe60e;</i>人员</a>
                <dl class="layui-nav-child">
                    <dd><a href="/pages/client/list.html" target="iframe"><span class="l-line"></span>客户列表</a></dd>
                    <dd><a href="/pages/user/list.html" target="iframe"><span class="l-line"></span>用户列表</a></dd>
                </dl>
            </li>

            <li class="layui-nav-item">
                <a href="/pages/personalInfo.html" target="iframe"><i class="iconfont">&#xe606;</i>个人信息</a>
            </li>
        </ul>
    </div>
    <!--右侧内容-->
    <div class="main-layout-container">
        <!--头部-->
        <div class="main-layout-header">
            <div class="menu-btn" id="hideBtn">
                <a href="javascript:;">
                    <span class="iconfont">&#xe60e;</span>
                </a>
            </div>
            <ul class="layui-nav" lay-filter="rightNav">
                <li class="layui-nav-item">
                    <a href="/pages/personalInfo.html" target="iframe" id="userName">-</a>
                </li>
                <li class="layui-nav-item"><a href="/pages/admin/login.html" id="quit">退出</a></li>
            </ul>
        </div>
        <!--主体内容-->
        <div class="main-layout-body" style="background-color: #ffffff;">
            <div class="layui-tab-item layui-show" style="height:800px; padding:10px 20px;">
                <iframe src="/pages/console.html" width="100%" height="115%" name="iframe" scrolling="auto"
                        class="iframe" framborder="0"></iframe>
            </div>
        </div>
    </div>
    <!--遮罩-->
    <div class="main-mask">

    </div>
</div>
</body>
<script>
    $(function (){

        $.ajax({
            type: "GET",
            url: "/user/hidden" ,
            success: function (vo) {
                let status = vo.status;
                if (status === 1){
                    $(".hidden").removeAttr("style");
                }
            }
        });

        $.ajax({
            type: "GET",
            url: "/user/" ,
            success: function (vo) {
                if (vo.obj != null){
                    $("#userName").html(vo.obj.u_name);
                }
            }
        });

        $("#quit").click(function(){
            $.ajax({
                type: "GET",
                url: "/user/quit" ,
                success: function () {}
            });
        });

    });
</script>
</html>
